C = g++

OPENCV_CFLAGS = `pkg-config --cflags opencv4`
OPENCV_LIBS = `pkg-config --libs opencv4`

# Compiler flags - ADD -lstdc++ HERE
CXXFLAGS = -Wall -std=c++11 $(OPENCV_CFLAGS)
LIBS = $(OPENCV_LIBS) -lstdc++ -lm

TARGET = eagle_main
SRCS = main.cpp ball_mapping.cpp ball_motion_analysis.cpp
HEADER = $(wildcard *.h)

OBJS = $(SRCS:.cpp=.o)

all: $(TARGET)

%.o: %.cpp
	$(CC) $(CXXFLAGS) -c $< -o $@ $(LIBS)

$(TARGET) : $(OBJS)
	$(CC) $(OBJS) $(CXXFLAGS) $(LIBS) -o $@

$(OBJS) : $(HEADER)

clean : 
	rm $(OBJS) $(TARGET)

